//part1:C09:ex9.38.cpp
//growth of vector.
#include <iostream>
#include <vector>

int main(void) {
  using namespace std;
  vector<int> vec;
  int isize, icapacity;
  for (isize = vec.size(), icapacity = vec.capacity(); isize <= icapacity; isize++) {
    vec.push_back(1);    
  }
  cout << "capacity: " << vec.capacity() << " elemments: " << vec.size() << endl;

  for (isize = vec.size(), icapacity = vec.capacity(); isize <= icapacity; isize++) {
    vec.push_back(1);    
  }
  cout << "capacity: " << vec.capacity() << " elemments: " << vec.size() << endl;
  
  return 0;
}
